import ntplib
import time


_ntp_client = ntplib.NTPClient()
_ntp_time = _ntp_client.request(host='ntp6.aliyun.com', version=2, port="ntp", timeout=5).tx_time

_date = time.strftime('%Y-%m-%d', time.localtime(_ntp_time))
_time = time.strftime('%X', time.localtime(_ntp_time))

print(_date, _time)
